package cn.hinglo.gameclaw.user.bean;

import lombok.Data;
import lombok.experimental.Accessors;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;

/**
 * @createTime: 2018/1/8
 * @author: HingLo
 * @description: 公告/通知实体类
 */
@Data
@Accessors(chain = true)
@Table(name = "notice")
public class Notice {
    @Id
    private String id;
    /**
     * //公告的具体内容
     */
    @NotNull(message = "公告内容不能为空")
    @Size(min = 10, max = 255, message = "公告内容不能低于10个或者超过255个字符")
    private String content;
    /**
     * //公告的标题
     */
    @Size(min = 2, max = 20, message = "公告内容不能低于2个或者超过20个字符")
    @NotNull(message = "公告标题不能为空")
    private String title;

    /**
     * 通知或者公告类型，(1:通知，2：公告)
     */
    private Integer type = 1;

    /**
     * 图标
     */
    private String icon;

    /**
     * //是否启用
     */
    private Boolean status;

    private Date date;
}
